:root[sizemode="fullscreen"]:not([inDOMFullscreen="true"]) #navigator-toolbox {
  position: fixed !important; /* Needed for content to take up entire height */
  z-index: 1000 !important; /* Puts the UI above the content */

  &:is(:hover, :focus-within) {
    margin-top: 0 !important;
  }
}

:root[sizemode="fullscreen"]:not([inDOMFullscreen="true"]) :-moz-any(#navigator-toolbox, #titlebar, #toolbar-menubar, #TabsToolbar, #nav-bar, #PersonalToolbar) {
  width: 100%; /* Makes the UI take up the entire width */
}

:root[sizemode="fullscreen"]:not([inDOMFullscreen="true"]) #urlbar:popover-open {
  // Prevent URLbar overlay #1028
  position: fixed !important;
}

@include OS($linux) {
  /* Fix transparent background */
  :root:is([tabsintitlebar], [customtitlebar])[sizemode="fullscreen"]:not([inDOMFullscreen="true"])#{$not_lwtheme} #TabsToolbar {
    appearance: auto !important;
  }
}
